package com.gopay.remote.vo;

import java.io.Serializable;

import com.gopay.remote.user.constants.JsonMapper;
import com.gopay.remote.vo.check.RealNameAuthenticationResponseVO;
import com.gopay.remote.vo.function.UserBindExpressCardResponseVO;
import com.gopay.remote.vo.function.UserRegisteResponseVO;

/**
 * user服务返回的类
 * @author qld
 *  add 2016-06-30
 * <li>Upadte: Andornicus.Ge - 增加子类说明</li>
 * <table border="2">
 *       <tr>
 *           <td>服务编号</td>
 *           <td>接口名称</td>
 *           <td>请求对象类型</td>
 *       </tr>
 *       <tr>
 *           <td>0101</td>
 *           <td>用户注册服务</td>
 *           <td>{@link UserRegisteResponseVO}</td>
 *       </tr>
 *       <tr>
 *           <td>0108</td>
 *           <td>用户绑定快捷卡</td>
 *           <td>{@link UserBindExpressCardResponseVO}</td>
 *       </tr>
 *       <tr>
 *           <td>0209</td>
 *           <td>实名认证校验</td>
 *           <td>{@link RealNameAuthenticationResponseVO}</td>
 *       </tr>
 * </table>
 */
public class UserResponseVO implements Serializable{

	private static final long serialVersionUID = 1L;
    private Boolean success;
    //内部错误码
    private String errCode;
    //错误信息
    private String errMsg;
    //数据,json类型的
    private String data;
	public Boolean getSuccess() {
		return success;
	}
	public void setSuccess(Boolean success) {
		this.success = success;
	}
	public String getErrCode() {
		return errCode;
	}
	public void setErrCode(String errCode) {
		this.errCode = errCode;
	}
	public String getErrMsg() {
		return errMsg;
	}
	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
  
	//写上工具的功能
	public <T> T getBean(Class<T> clazz){
	    
	    return JsonMapper.nonDefaultMapper().fromJson(this.data, clazz);
	}
}
